Optimal. Leaf size=166 \[ \frac {(b c-a d)^2 \tan ^{-1}\left (\frac {x \sqrt {d e-c f}}{\sqrt {c} \sqrt {e+f x^2}}\right )}{\sqrt {c} d^2 \sqrt {d e-c f}}-\frac {b (b c-a d) \tanh ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e+f x^2}}\right )}{d^2 \sqrt {f}}-\frac {b (b e-2 a f) \tanh ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e+f x^2}}\right )}{2 d f^{3/2}}+\frac {b^2 x \sqrt {e+f x^2}}{2 d f} \]
________________________________________________________________________________________
Rubi [A] time = 0.11, antiderivative size = 166, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 7, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.233, Rules used = {545, 388, 217, 206, 523, 377, 205} \begin {gather*} \frac {(b c-a d)^2 \tan ^{-1}\left (\frac {x \sqrt {d e-c f}}{\sqrt {c} \sqrt {e+f x^2}}\right )}{\sqrt {c} d^2 \sqrt {d e-c f}}-\frac {b (b c-a d) \tanh ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e+f x^2}}\right )}{d^2 \sqrt {f}}-\frac {b (b e-2 a f) \tanh ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e+f x^2}}\right )}{2 d f^{3/2}}+\frac {b^2 x \sqrt {e+f x^2}}{2 d f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 206
Rule 217
Rule 377
Rule 388
Rule 523
Rule 545
Rubi steps
\begin {align*} \int \frac {\left (a+b x^2\right )^2}{\left (c+d x^2\right ) \sqrt {e+f x^2}} \, dx &=\frac {b \int \frac {a+b x^2}{\sqrt {e+f x^2}} \, dx}{d}+\frac {(-b c+a d) \int \frac {a+b x^2}{\left (c+d x^2\right ) \sqrt {e+f x^2}} \, dx}{d}\\ &=\frac {b^2 x \sqrt {e+f x^2}}{2 d f}-\frac {(b (b c-a d)) \int \frac {1}{\sqrt {e+f x^2}} \, dx}{d^2}+\frac {(b c-a d)^2 \int \frac {1}{\left (c+d x^2\right ) \sqrt {e+f x^2}} \, dx}{d^2}-\frac {(b (b e-2 a f)) \int \frac {1}{\sqrt {e+f x^2}} \, dx}{2 d f}\\ &=\frac {b^2 x \sqrt {e+f x^2}}{2 d f}-\frac {(b (b c-a d)) \operatorname {Subst}\left (\int \frac {1}{1-f x^2} \, dx,x,\frac {x}{\sqrt {e+f x^2}}\right )}{d^2}+\frac {(b c-a d)^2 \operatorname {Subst}\left (\int \frac {1}{c-(-d e+c f) x^2} \, dx,x,\frac {x}{\sqrt {e+f x^2}}\right )}{d^2}-\frac {(b (b e-2 a f)) \operatorname {Subst}\left (\int \frac {1}{1-f x^2} \, dx,x,\frac {x}{\sqrt {e+f x^2}}\right )}{2 d f}\\ &=\frac {b^2 x \sqrt {e+f x^2}}{2 d f}+\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {d e-c f} x}{\sqrt {c} \sqrt {e+f x^2}}\right )}{\sqrt {c} d^2 \sqrt {d e-c f}}-\frac {b (b c-a d) \tanh ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e+f x^2}}\right )}{d^2 \sqrt {f}}-\frac {b (b e-2 a f) \tanh ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e+f x^2}}\right )}{2 d f^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.34, size = 150, normalized size = 0.90 \begin {gather*} \frac {\frac {2 f (b c-a d)^2 \tan ^{-1}\left (\frac {x \sqrt {d e-c f}}{\sqrt {c} \sqrt {e+f x^2}}\right )+b^2 \sqrt {c} d x \sqrt {e+f x^2} \sqrt {d e-c f}}{\sqrt {c} f \sqrt {d e-c f}}-\frac {b \tanh ^{-1}\left (\frac {\sqrt {f} x}{\sqrt {e+f x^2}}\right ) (-4 a d f+2 b c f+b d e)}{f^{3/2}}}{2 d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.36, size = 175, normalized size = 1.05 \begin {gather*} \frac {\left (-a^2 d^2+2 a b c d-b^2 c^2\right ) \tan ^{-1}\left (\frac {c \sqrt {f}-d x \sqrt {e+f x^2}+d \sqrt {f} x^2}{\sqrt {c} \sqrt {d e-c f}}\right )}{\sqrt {c} d^2 \sqrt {d e-c f}}+\frac {\log \left (\sqrt {e+f x^2}-\sqrt {f} x\right ) \left (-4 a b d f+2 b^2 c f+b^2 d e\right )}{2 d^2 f^{3/2}}+\frac {b^2 x \sqrt {e+f x^2}}{2 d f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 6.22, size = 1111, normalized size = 6.69 \begin {gather*} \left [-\frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {-c d e + c^{2} f} f^{2} \log \left (\frac {{\left (d^{2} e^{2} - 8 \, c d e f + 8 \, c^{2} f^{2}\right )} x^{4} + c^{2} e^{2} - 2 \, {\left (3 \, c d e^{2} - 4 \, c^{2} e f\right )} x^{2} - 4 \, {\left ({\left (d e - 2 \, c f\right )} x^{3} - c e x\right )} \sqrt {-c d e + c^{2} f} \sqrt {f x^{2} + e}}{d^{2} x^{4} + 2 \, c d x^{2} + c^{2}}\right ) - 2 \, {\left (b^{2} c d^{2} e f - b^{2} c^{2} d f^{2}\right )} \sqrt {f x^{2} + e} x + {\left (b^{2} c d^{2} e^{2} + {\left (b^{2} c^{2} d - 4 \, a b c d^{2}\right )} e f - 2 \, {\left (b^{2} c^{3} - 2 \, a b c^{2} d\right )} f^{2}\right )} \sqrt {f} \log \left (-2 \, f x^{2} - 2 \, \sqrt {f x^{2} + e} \sqrt {f} x - e\right )}{4 \, {\left (c d^{3} e f^{2} - c^{2} d^{2} f^{3}\right )}}, \frac {2 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {c d e - c^{2} f} f^{2} \arctan \left (\frac {\sqrt {c d e - c^{2} f} {\left ({\left (d e - 2 \, c f\right )} x^{2} - c e\right )} \sqrt {f x^{2} + e}}{2 \, {\left ({\left (c d e f - c^{2} f^{2}\right )} x^{3} + {\left (c d e^{2} - c^{2} e f\right )} x\right )}}\right ) + 2 \, {\left (b^{2} c d^{2} e f - b^{2} c^{2} d f^{2}\right )} \sqrt {f x^{2} + e} x - {\left (b^{2} c d^{2} e^{2} + {\left (b^{2} c^{2} d - 4 \, a b c d^{2}\right )} e f - 2 \, {\left (b^{2} c^{3} - 2 \, a b c^{2} d\right )} f^{2}\right )} \sqrt {f} \log \left (-2 \, f x^{2} - 2 \, \sqrt {f x^{2} + e} \sqrt {f} x - e\right )}{4 \, {\left (c d^{3} e f^{2} - c^{2} d^{2} f^{3}\right )}}, -\frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {-c d e + c^{2} f} f^{2} \log \left (\frac {{\left (d^{2} e^{2} - 8 \, c d e f + 8 \, c^{2} f^{2}\right )} x^{4} + c^{2} e^{2} - 2 \, {\left (3 \, c d e^{2} - 4 \, c^{2} e f\right )} x^{2} - 4 \, {\left ({\left (d e - 2 \, c f\right )} x^{3} - c e x\right )} \sqrt {-c d e + c^{2} f} \sqrt {f x^{2} + e}}{d^{2} x^{4} + 2 \, c d x^{2} + c^{2}}\right ) - 2 \, {\left (b^{2} c d^{2} e f - b^{2} c^{2} d f^{2}\right )} \sqrt {f x^{2} + e} x - 2 \, {\left (b^{2} c d^{2} e^{2} + {\left (b^{2} c^{2} d - 4 \, a b c d^{2}\right )} e f - 2 \, {\left (b^{2} c^{3} - 2 \, a b c^{2} d\right )} f^{2}\right )} \sqrt {-f} \arctan \left (\frac {\sqrt {-f} x}{\sqrt {f x^{2} + e}}\right )}{4 \, {\left (c d^{3} e f^{2} - c^{2} d^{2} f^{3}\right )}}, \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {c d e - c^{2} f} f^{2} \arctan \left (\frac {\sqrt {c d e - c^{2} f} {\left ({\left (d e - 2 \, c f\right )} x^{2} - c e\right )} \sqrt {f x^{2} + e}}{2 \, {\left ({\left (c d e f - c^{2} f^{2}\right )} x^{3} + {\left (c d e^{2} - c^{2} e f\right )} x\right )}}\right ) + {\left (b^{2} c d^{2} e f - b^{2} c^{2} d f^{2}\right )} \sqrt {f x^{2} + e} x + {\left (b^{2} c d^{2} e^{2} + {\left (b^{2} c^{2} d - 4 \, a b c d^{2}\right )} e f - 2 \, {\left (b^{2} c^{3} - 2 \, a b c^{2} d\right )} f^{2}\right )} \sqrt {-f} \arctan \left (\frac {\sqrt {-f} x}{\sqrt {f x^{2} + e}}\right )}{2 \, {\left (c d^{3} e f^{2} - c^{2} d^{2} f^{3}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.02, size = 1052, normalized size = 6.34 \begin {gather*} -\frac {a^{2} \ln \left (\frac {\frac {2 \sqrt {-c d}\, \left (x -\frac {\sqrt {-c d}}{d}\right ) f}{d}-\frac {2 \left (c f -d e \right )}{d}+2 \sqrt {-\frac {c f -d e}{d}}\, \sqrt {\left (x -\frac {\sqrt {-c d}}{d}\right )^{2} f +\frac {2 \sqrt {-c d}\, \left (x -\frac {\sqrt {-c d}}{d}\right ) f}{d}-\frac {c f -d e}{d}}}{x -\frac {\sqrt {-c d}}{d}}\right )}{2 \sqrt {-c d}\, \sqrt {-\frac {c f -d e}{d}}}+\frac {a^{2} \ln \left (\frac {-\frac {2 \sqrt {-c d}\, \left (x +\frac {\sqrt {-c d}}{d}\right ) f}{d}-\frac {2 \left (c f -d e \right )}{d}+2 \sqrt {-\frac {c f -d e}{d}}\, \sqrt {\left (x +\frac {\sqrt {-c d}}{d}\right )^{2} f -\frac {2 \sqrt {-c d}\, \left (x +\frac {\sqrt {-c d}}{d}\right ) f}{d}-\frac {c f -d e}{d}}}{x +\frac {\sqrt {-c d}}{d}}\right )}{2 \sqrt {-c d}\, \sqrt {-\frac {c f -d e}{d}}}+\frac {a b c \ln \left (\frac {\frac {2 \sqrt {-c d}\, \left (x -\frac {\sqrt {-c d}}{d}\right ) f}{d}-\frac {2 \left (c f -d e \right )}{d}+2 \sqrt {-\frac {c f -d e}{d}}\, \sqrt {\left (x -\frac {\sqrt {-c d}}{d}\right )^{2} f +\frac {2 \sqrt {-c d}\, \left (x -\frac {\sqrt {-c d}}{d}\right ) f}{d}-\frac {c f -d e}{d}}}{x -\frac {\sqrt {-c d}}{d}}\right )}{\sqrt {-c d}\, \sqrt {-\frac {c f -d e}{d}}\, d}-\frac {a b c \ln \left (\frac {-\frac {2 \sqrt {-c d}\, \left (x +\frac {\sqrt {-c d}}{d}\right ) f}{d}-\frac {2 \left (c f -d e \right )}{d}+2 \sqrt {-\frac {c f -d e}{d}}\, \sqrt {\left (x +\frac {\sqrt {-c d}}{d}\right )^{2} f -\frac {2 \sqrt {-c d}\, \left (x +\frac {\sqrt {-c d}}{d}\right ) f}{d}-\frac {c f -d e}{d}}}{x +\frac {\sqrt {-c d}}{d}}\right )}{\sqrt {-c d}\, \sqrt {-\frac {c f -d e}{d}}\, d}-\frac {b^{2} c^{2} \ln \left (\frac {\frac {2 \sqrt {-c d}\, \left (x -\frac {\sqrt {-c d}}{d}\right ) f}{d}-\frac {2 \left (c f -d e \right )}{d}+2 \sqrt {-\frac {c f -d e}{d}}\, \sqrt {\left (x -\frac {\sqrt {-c d}}{d}\right )^{2} f +\frac {2 \sqrt {-c d}\, \left (x -\frac {\sqrt {-c d}}{d}\right ) f}{d}-\frac {c f -d e}{d}}}{x -\frac {\sqrt {-c d}}{d}}\right )}{2 \sqrt {-c d}\, \sqrt {-\frac {c f -d e}{d}}\, d^{2}}+\frac {b^{2} c^{2} \ln \left (\frac {-\frac {2 \sqrt {-c d}\, \left (x +\frac {\sqrt {-c d}}{d}\right ) f}{d}-\frac {2 \left (c f -d e \right )}{d}+2 \sqrt {-\frac {c f -d e}{d}}\, \sqrt {\left (x +\frac {\sqrt {-c d}}{d}\right )^{2} f -\frac {2 \sqrt {-c d}\, \left (x +\frac {\sqrt {-c d}}{d}\right ) f}{d}-\frac {c f -d e}{d}}}{x +\frac {\sqrt {-c d}}{d}}\right )}{2 \sqrt {-c d}\, \sqrt {-\frac {c f -d e}{d}}\, d^{2}}+\frac {2 a b \ln \left (\sqrt {f}\, x +\sqrt {f \,x^{2}+e}\right )}{d \sqrt {f}}-\frac {b^{2} c \ln \left (\sqrt {f}\, x +\sqrt {f \,x^{2}+e}\right )}{d^{2} \sqrt {f}}-\frac {b^{2} e \ln \left (\sqrt {f}\, x +\sqrt {f \,x^{2}+e}\right )}{2 d \,f^{\frac {3}{2}}}+\frac {\sqrt {f \,x^{2}+e}\, b^{2} x}{2 d f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {{\left (b x^{2} + a\right )}^{2}}{{\left (d x^{2} + c\right )} \sqrt {f x^{2} + e}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (b\,x^2+a\right )}^2}{\left (d\,x^2+c\right )\,\sqrt {f\,x^2+e}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a + b x^{2}\right )^{2}}{\left (c + d x^{2}\right ) \sqrt {e + f x^{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________